-
-
Notifications
You must be signed in to change notification settings - Fork 644
CMake: Support for XML documentation #1682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@dsnopek should I add the main function in the doc_source_generator.py to match the latest build_profile.py ? |
Thanks! You can squash my commit in your commit, and I can close mine as superseded by yours.
UPDATE: I changed my mind on this bit - see comment below. |
Er, nevermind, thinking about this a little more, I think it's fine as a separate script. I don't want to end up with too many scripts at the top-level, but this is distinct enough from everything else However, to answer the original questsion: no, I don't think |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tried this with the test project and it worked great!
Skimming the code, that looks good to me too.
I think the only things this PR needs is:
- Squash my commit and your commit like I mentioned above (you can list me as
Co-authored-by:
in the commit if you want, but my contribution is pretty small, I don't mind if it's omitted) - Rebase on
master
, since I just merged PR CMake: Support for using build_profile.json #1670
Add new function generate_doc_source to python_callouts.cmake Update Test extension to use generate_doc_source function and include generated file in the build. Cleanup: Fix godotcpp.py imports after rebase Pre-Commit hook sorted python imports in doc_source_generator.py - replace ${CMAKE_CURRENT_SOURCE_DIR} with ${godot-cpp_SOURCE_DIR} when referencing current working directory and script locations when invoking python scripts. Co-authored-by: David Snopek <dsnopek@gmail.com>
532b7f9
to
8814ac5
Compare
This PR extends #1499 - [DRAFT] Add CMake support for XML documentation
which follows #1374 - Allow submitting documentation to the Godot editor
This is also built upon #1670 - CMake: Support for using build_profile.json
This PR adds the equivalent functionality to the CMake build scripts. A summary below.
The SCons implementation adds a BUILDER to the env in tools/godotcpp.py:513
Which is then available for consumers to use, with the test example showing how at test/SConstruct:18
This CMake implementationa mirrors this with a function in cmake/python_callouts.cmake:109
which calls the python function of the same name from doc_source_generator.py to create the cpp file at OUTPUT_PATH which can then be added to the sources list of the target. The test extension shows this starting in test/CMakeLists.txt:10